from add import Add
import pytest
import allure

from exceldata_get import getexceldata
from exceldata_get import getexceldata


class Test_excel:
    @allure.title("加法测试")
    @pytest.mark.parametrize("a,b,c",getexceldata().get_addata(0))
    def test_add(self,a,b,c):
        tadd = Add()
        s = tadd.addnub(a,b)
        assert s == c
    @allure.title("减法测试")
    @pytest.mark.parametrize("a,b,c",getexceldata().get_addata(1))
    def test_jian(self,a,b,c):
        tadd = Add()
        s = tadd.jianfa(a,b)
        assert s == c
    @allure.title("乘法测试")
    @pytest.mark.parametrize("a,b,c",getexceldata().get_addata(2))
    def test_mul(self,a,b,c):
        tadd = Add()
        s = tadd.chengfa(a,b)
        assert s == c
    @allure.title("除法测试")
    @pytest.mark.parametrize("a,b,c",getexceldata().get_addata(3))
    def test_div(self,a,b,c):
        tadd = Add()
        s = tadd.chufa(a,b)
        assert s == c















